package IO;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;

public class FileReader1 {
    public static void main(String[] args) throws IOException {
        try (Reader re = new FileReader("day10-file_io/src/File3.txt")) {
            char[]src=new char[1024];
            int len;
            while((len=re.read(src))!=-1){
                System.out.println(len);
                System.out.println(new String(src,0,len));
            }
        }catch (Exception e) {
            e.printStackTrace();
        }
    }
}
